-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Respect "prefers-color-scheme" media selector for guests #21366
Respect "prefers-color-scheme" media selector for guests #21366
Conversation
Signed-off-by: Joas Schilling <[email protected]>
cc @nextcloud/accessibility |
cc @nextcloud/theming |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, this is pretty amazing! :) Great integration and works well when tested with the link sharing pages of Forms, Talk, and Files.
Where does the actual |
Its on the link meta tag, that is the only why you can set global css vars within a condition |
Does not fully fix #12276 as it is only for unauthorized access though public pages, but a good first step 👍 |
Yeah, we can show a not about the personal setting based on the selector in the future, but first guests only. |
How can I turn this off? For some reason, nextcloud switched to dark mode today after I logged in, and I really dislike it. The dashboard is unreadable and everything looks unsharp to my eyes. I need dark on white text, which is available, but not accessible to me, apparently. |
Update: another logout - login cycle fixed it... |
Guests now automatically see dark theme when the browser tells the website it prefers a
dark
style:https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme
A similar setting for contrast
high
seems to be in development but is not supported:https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-contrast
See https://stackoverflow.com/a/56757527 for helps how to test this quickly
Edit by @georgehrke:
fixes #12276